package com.v2.k17;


import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * 测试循环依赖  测试spring生成bean  对属性赋值
 */
public class Test {

	public static void main(String[] args) {
		AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);

		//.getBean("A");是取不到的，名字是a
		A a = (A)applicationContext.getBean("a");
		System.out.println("a = "+a+" ; a.b = "+a.b); //a = com.v2.k17.A@32eebfca ; a.b = null
	}
}
